import java.net.URLDecoder;
import java.util.Scanner;
public class Demo_2 {
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		String a = input.nextLine();
		try {
			String str1 = URLDecoder.decode(a, "UTF-8");
			String str2 = new String(a.getBytes(),"UTF-8");
			System.out.println(str1);
			System.out.println(str2);
		} catch (Exception e) {
		}
	}
}